//
//  UIImage+RTL.m
//  BaseLib
//
//  Created by CPX on 2018/6/28.
//  Copyright © 2018年 CPX. All rights reserved.
//

#import "UIImage+RTL.h"
#import "YYCategories.h"

/**
 图片帮助类
 @author yzl
 */
@implementation UIImage (RTL)

+ (instancetype)RTL_ImageWithName:(NSString*)name{
    if ([UIView appearance].semanticContentAttribute == UISemanticContentAttributeForceRightToLeft) {
        return [UIImage imageNamed:name].imageByFlipHorizontal;
    }
    else{
        return [UIImage imageNamed:name];
    }
}

@end
